//
//  KTMyLotteryVC.m
//  KTLotteryTicket
//
//  Created by CoolKi on 16/3/4.
//  Copyright © 2016年 CoolKi. All rights reserved.
//

#import "KTMyLotteryVC.h"
#import "KTSettingTVC.h"

@interface KTMyLotteryVC ()
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;

@end

@implementation KTMyLotteryVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    //拉伸登录按钮图片
    UIImage * loginBtnImg = self.loginBtn.currentBackgroundImage;
    UIImage * newImg = [loginBtnImg stretchableImageWithLeftCapWidth:loginBtnImg.size.width*.5 topCapHeight:loginBtnImg.size.height*.5];
    [self.loginBtn setBackgroundImage:newImg forState:UIControlStateNormal];
    
    //设置左侧的 客服 Button
    UIButton * navLeftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [navLeftBtn setImage:[UIImage imageNamed:@"FBMM_Barbutton"] forState:UIControlStateNormal];
    [navLeftBtn setTitle:@"客服" forState:UIControlStateNormal];
    [navLeftBtn sizeToFit];
    [navLeftBtn addTarget:self action:@selector(navLeftBtnClick) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:navLeftBtn];
    
    //设置右侧 系统自带item
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageWithOriginImage:@"Mylottery_config"] style:0 target:self action:@selector(navRightBtnClick)];
    
}

- (void)navLeftBtnClick{
    NSLog(@"%s",__func__);
}
- (void)navRightBtnClick{

    KTSettingTVC *vc = [[KTSettingTVC alloc] init];
    vc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
